package com.qidianit.mes.production.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qidianit.mes.common.pojo.MesResult;
import com.qidianit.mes.pojo.Craft;
import com.qidianit.mes.production.service.CraftService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 戴着假发的程序员
 * @company 起点编程
 * @date 2025/8/5 10:29
 * @description
 */
@RestController
@RequestMapping("/craft")
public class CraftController {
    @Autowired
    private CraftService craftService;
    @GetMapping("/list")
    public MesResult<Page<Craft>> list(@RequestParam(defaultValue = "1") int pageNun,@RequestParam(defaultValue = "10") int pageSize, Craft craft){
        return craftService.getCraftList(pageNun,pageSize,craft);
    }
}
